function getExternalLinkAttributes( $link, $text, $class='' ) {
global $wgUser, $wgOut, $wgLang;
+ $same = ($link == $text);
$link = urldecode( $link );
$link = $wgLang->checkTitleEncoding( $link );
$link = str_replace( '_', ' ', $link );
$r = ($class != '') ? " class='$class'" : " class='external'";
- if ( 1 == $wgUser->getOption( 'hover' ) ) {
+ if ( !$same && $wgUser->getOption( 'hover' ) ) {
$r .= " title=\"{$link}\"";
}
return $r;
$fname = 'Skin::makeLinkObj';
# Fail gracefully
- if ( ! isset($nt) )
+ if ( ! isset($nt) ) {
+ # wfDebugDieBacktrace();
return "<!-- ERROR -->{$prefix}{$text}{$trail}";
+ }
if ( $nt->isExternal() ) {
$u = $nt->getFullURL();
global $wgOut, $wgUser;
# Fail gracefully
- if ( ! isset($nt) )
+ if ( ! isset($nt) ) {
+ # wfDebugDieBacktrace();
return "<!-- ERROR -->{$prefix}{$text}{$trail}";
+ }
$fname = 'Skin::makeBrokenLinkObj';
wfProfileIn( $fname );